package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.SelectExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.SelectItemContext;

/**
 * select item 语法结构遍历
 * 
 * @author zwd
 *
 */
public class SelectItemVisitor extends AbsCQLParserBaseVisitor<SelectItemContext> {

	private SelectItemContext context = null;

	public SelectItemVisitor() {
		context = new SelectItemContext();
	}

	@Override
	protected SelectItemContext defaultResult() {
		return context;
	}

	@Override
	public SelectItemContext visitSelectExpression(@NotNull SelectExpressionContext ctx) {
		SelectExpressionVisitor visitor = new SelectExpressionVisitor();
		context.setExpression(visitor.visit(ctx));
		return context;
	}

}
